package com.ccntec.spark.core.tags.form.button;

import javax.servlet.jsp.JspException;

import com.ccntec.spark.core.BasicTagSupport;

public class SubmitButtonTag extends BasicTagSupport{
	
	private String value ;//提交按钮的文本
	
	@Override
	public int doStartTag() throws JspException {
		StringBuffer html = new StringBuffer();
		html.append("<input class=\"btn btn-primary\" type=\"submit\" ");
		if(!isNull(value)){
			html.append("value=\""+value+" \" />");
		}else{
			html.append("value=\"提交\" />");
		}
		outPrint(html);
		return EVAL_BODY_INCLUDE;
	}
	@Override
	public int doEndTag() throws JspException {
		return EVAL_PAGE;
	}
	@Override
	public void release() {
		// TODO Auto-generated method stub
		super.release();
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
}
